using System;
using System.Collections;
using System.Collections.Generic;
using HR60_PanelSoft.Model.BaseModel;

namespace HR60_PanelSoft.Model
{
	public class DeviceGroup : RefModel
	{
		/// <summary>
		/// 名称
		/// </summary>
		public string name = "";

		/// <summary>
		/// 名称
		/// </summary>
		public List<Device> devices = new List<Device>();

		/// <summary>
		/// 查找单控设备列表
		/// </summary>
		/// <returns></returns>
		public IList<Device> findButtonCtrlDevices()
		{
			IList<Device> list = new List<Device>();
			foreach (Device dev in devices)
			{
				if(dev.type.canButtonCtrl) list.Add(dev);
			}
			return list;
		}
	}
}

